package com.cy.pattern.singleton;

/**
 * 懒汉式单例模式
 *
 * Created by yun.chen on 2015/9/28.
 */
public class SingletonB {

    private static SingletonB singletonB ;

    private SingletonB () {}

    public static synchronized SingletonB getInstance() {
        if(singletonB == null) {
            singletonB = new SingletonB();
        }
        return singletonB;
    }
}
